package kr.co.fotosketch.spring.sample01_01.user;

import java.sql.SQLException;

import kr.co.fotosketch.spring.sample01_01.user.dao.UserDao;
import kr.co.fotosketch.spring.sample01_01.user.domain.User;

public class Main {
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		UserDao dao = new UserDao();
		
		User user = new User();
		user.setId("b1234");
		user.setName("WGS");
		user.setPassword("pass");
		
		dao.addUser(user);
		
		System.out.println("reg Success " + user.getId());
		
		User user2 = dao.getUser(user.getId());
		
		System.out.println("get Success" + user2.getName());
	}
}
